package com.wing.res.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.product.model.response.ProductPlanningTreeVo;
import com.wing.qualification.model.entity.Qualification;
import com.wing.qualification.model.response.QualificationVO;
import com.wing.res.model.entity.BenchmarkBook;
import com.wing.res.model.response.ResBenchmarkBookDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 基准书-Dao
 *
 * @author xiayang
 */
@Mapper
public interface BenchmarkBookDao extends BaseMapper<BenchmarkBook> {

    /**
     * 分页列表
     *
     * @param page
     * @param params
     * @return
     */
    List<BenchmarkBook> list(@Param("page") Page<BenchmarkBook> page, @Param("params") Map<String, Object> params);

    /**
     * 根据id查询基准书详情
     * @param id
     * @return
     */
    ResBenchmarkBookDetailVo getDetailBy(@Param("id") Long id,@Param("params") Map<String, Object> params);

    /**
     * 获取物料下的基准书最终版本号
     * @param productDetailId 物料id
     * @return
     */
    String getMaxVersionBy(@Param("productDetailId") Long productDetailId);
}
